package main

import(
	"fmt"
)

func main() {
	c1 := make(chan int,2)
	c2 := make(chan int,2)
	c3 := make(chan int,2)
	// var c1, c2, c3 chan int
	var i1, i2 int

	// c1 <- 5
	c3 <- 10

	select {
		case i1 = <-c1:
			fmt.Println("c1", i1)
		case c2 <- i2:
			fmt.Println("c2", <-c2)
		case i3, ok := <- c3:
			fmt.Println("ok", ok)
			if(ok){
				fmt.Println("c3", i3)
			}else{
				fmt.Println("no c3")
			}
		default:
			fmt.Println("none")
	}
}